<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class DeleteCost extends Page
{
       public $hfcost = null;
       public $hfincident = null;
       function DeleteCostCreate($sender, $params)
       {
       $cost = $_GET['auto_id'];
       $inc = $_GET['incident_id'];
       $this->hfcost->setValue($cost);
       $this->hfincident->setValue($inc);


       $result = mysql_query("delete from incident_cost_tbl where auto_id='".$this->hfcost->getValue()."'")
       or die("DEL COST ".mysql_error());

       redirect('incident_cost_list.php?incident='.$this->hfincident->getValue());


       }

}

global $application;

global $DeleteCost;

//Creates the form
$DeleteCost=new DeleteCost($application);

//Read from resource file
$DeleteCost->loadResource(__FILE__);

//Shows the form
$DeleteCost->show();

?>